class Variable:
    #定义类变量,对象间共享
    varType = "person"
    def __init__(self,name,age):
        #定义实例变量，每个对象都拥有一个
        self.name = name
        self.age = age
    def get(self):
        print("type is {0}, name is {1}, age is {2}".format(self.varType,self.name,self.age))

if __name__ == '__main__':
    jason=Variable("jason pg",25)
    jason.get()
    lili = Variable("lili", 10)
    Variable.varType = "cat"
    lili.get()
    jason.get()

